<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: ArpHost Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00014.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">ArpHost Class Reference<div class="ingroups"><a class="el" href="a00507.html">netwLayer - network layer modules</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="ArpHost" --><!-- doxytag: inherits="ArpInterface,AddressingInterface,BaseModule" -->
<p>A class to convert integer layer addresses.  
 <a href="a00014.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00446_source.html">ArpHost.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ArpHost:</div>
<div class="dyncontent">
<div class="center"><img src="a00555.png" border="0" usemap="#ArpHost_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ArpHost:</div>
<div class="dyncontent">
<div class="center"><img src="a00556.png" border="0" usemap="#ArpHost_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00557.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a3ca8e0906ce88bc0a15f066e15cc0377">initialize</a> (int stage)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Basic initialization for all modules.  <a href="#a3ca8e0906ce88bc0a15f066e15cc0377"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2d7d301d833e0adede08407e5f52a188"></a><!-- doxytag: member="ArpHost::handleMessage" ref="a2d7d301d833e0adede08407e5f52a188" args="(cMessage *)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a2d7d301d833e0adede08407e5f52a188">handleMessage</a> (cMessage *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">should not be called, instead direct calls to the radio methods should be used. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8b3d00cdaf3f160612ded6a4b06280c0"></a><!-- doxytag: member="ArpHost::getMacAddr" ref="a8b3d00cdaf3f160612ded6a4b06280c0" args="(const LAddress::L3Type &amp;netwAddr) const " -->
virtual <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">LAddress::L2Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a8b3d00cdaf3f160612ded6a4b06280c0">getMacAddr</a> (const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a> &amp;netwAddr) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a L2 address to a given L3 address <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7884fa8ccc3dae4f66b14ded91af82f1"></a><!-- doxytag: member="ArpHost::getNetwAddr" ref="a7884fa8ccc3dae4f66b14ded91af82f1" args="(const LAddress::L2Type &amp;macAddr) const " -->
virtual <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a7884fa8ccc3dae4f66b14ded91af82f1">getNetwAddr</a> (const <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">LAddress::L2Type</a> &amp;macAddr) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a L3 address to a given L2 address <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2664d803237a5f16a7f58b2bd26a115"></a><!-- doxytag: member="ArpHost::myMacAddr" ref="ad2664d803237a5f16a7f58b2bd26a115" args="(const cModule *mac) const " -->
virtual <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">LAddress::L2Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#ad2664d803237a5f16a7f58b2bd26a115">myMacAddr</a> (const cModule *mac) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the L2 address for the passed mac. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac41771ef247478b921e90161ba19aea5"></a><!-- doxytag: member="ArpHost::myNetwAddr" ref="ac41771ef247478b921e90161ba19aea5" args="(const cModule *netw) const " -->
virtual <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#ac41771ef247478b921e90161ba19aea5">myNetwAddr</a> (const cModule *netw) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the L3 address for the passed net. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6415d8077862f22c8323380afb659d21"></a><!-- doxytag: member="ArpHost::offset" ref="a6415d8077862f22c8323380afb659d21" args="" -->
int&#160;</td><td class="memItemRight" valign="bottom"><b>offset</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A class to convert integer layer addresses. </p>
<p>This class assumes that a host contains a NetwLayer and a Nic module. The Nic module contains a MAC address. It also assumes that hosts are part of an array. macaddress=netaddress= host index in array.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Jerome Rousselot </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a3ca8e0906ce88bc0a15f066e15cc0377"></a><!-- doxytag: member="ArpHost::initialize" ref="a3ca8e0906ce88bc0a15f066e15cc0377" args="(int stage)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArpHost::initialize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>stage</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Basic initialization for all modules. </p>
<p>Subscription should be in stage==0, and firing notifications in stage==1 or later.</p>
<p>NOTE: You have to call this in the <a class="el" href="a00014.html#a3ca8e0906ce88bc0a15f066e15cc0377" title="Basic initialization for all modules.">initialize()</a> function of the inherited class! </p>

<p>Reimplemented from <a class="el" href="a00027.html#a03030e439aaf030c83da6e71e8be2f80">BaseModule</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="a00014.html#a3ca8e0906ce88bc0a15f066e15cc0377" title="Basic initialization for all modules.">BaseModule::initialize</a>(stage);
    <span class="keywordflow">if</span> (stage == 0)
    {
        offset = par(<span class="stringliteral">&quot;offset&quot;</span>);
    }
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/netw/<a class="el" href="a00446_source.html">ArpHost.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/netw/ArpHost.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00014.html">ArpHost</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:31 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
